.class public Lcom/glympse/android/glympse/MapControl;
.super Lcom/google/android/maps/MapView;
.source "MapControl.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/glympse/android/glympse/MapControl$DoubleTapGestureDetector;,
        Lcom/glympse/android/glympse/MapControl$ELabelMode;,
        Lcom/glympse/android/glympse/MapControl$EViewMode;,
        Lcom/glympse/android/glympse/MapControl$LocationOverlay;,
        Lcom/glympse/android/glympse/MapControl$OnClickZoomIn;,
        Lcom/glympse/android/glympse/MapControl$OnClickZoomOut;
    }
.end annotation


# static fields
.field protected static final m_fltPanThreshhold:F


# instance fields
.field protected m_eLabelMode:Lcom/glympse/android/glympse/MapControl$ELabelMode;

.field protected m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

.field protected m_fPanning:Z

.field protected m_fltDensity:F

.field protected m_fltDownX:F

.field protected m_fltDownY:F

.field protected m_oGestureDetector:Landroid/view/GestureDetector;

.field protected m_oMapController:Lcom/google/android/maps/MapController;

.field protected m_oOnClickZoomIn:Lcom/glympse/android/glympse/MapControl$OnClickZoomIn;

.field protected m_oOnClickZoomOut:Lcom/glympse/android/glympse/MapControl$OnClickZoomOut;


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 69
    sget-object v0, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;

    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->ParseInt(Ljava/lang/String;)I

    move-result v0

    const/4 v1, 0x3

    if-lt v0, v1, :cond_0

    const/16 v0, 0x19

    :goto_0
    int-to-float v0, v0

    sput v0, Lcom/glympse/android/glympse/MapControl;->m_fltPanThreshhold:F

    .line 52
    return-void

    .line 69
    :cond_0
    const/16 v0, 0xc

    goto :goto_0
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 4
    .parameter "oContext"

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x0

    const/high16 v1, -0x4080

    .line 104
    const-string v0, "02S5FV6eeZ_ImJ1cmB2NyJ4eqvEJMUC0rHOrWwg"

    invoke-direct {p0, p1, v0}, Lcom/google/android/maps/MapView;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    .line 71
    iput-object v3, p0, Lcom/glympse/android/glympse/MapControl;->m_oMapController:Lcom/google/android/maps/MapController;

    .line 72
    iput v1, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownX:F

    .line 73
    iput v1, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownY:F

    .line 74
    iput-boolean v2, p0, Lcom/glympse/android/glympse/MapControl;->m_fPanning:Z

    .line 75
    sget-object v0, Lcom/glympse/android/glympse/MapControl$ELabelMode;->Avatar:Lcom/glympse/android/glympse/MapControl$ELabelMode;

    iput-object v0, p0, Lcom/glympse/android/glympse/MapControl;->m_eLabelMode:Lcom/glympse/android/glympse/MapControl$ELabelMode;

    .line 76
    sget-object v0, Lcom/glympse/android/glympse/MapControl$EViewMode;->MainMap:Lcom/glympse/android/glympse/MapControl$EViewMode;

    iput-object v0, p0, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    .line 77
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->density:F

    iput v0, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    .line 78
    new-instance v0, Lcom/glympse/android/glympse/MapControl$OnClickZoomIn;

    invoke-direct {v0, p0}, Lcom/glympse/android/glympse/MapControl$OnClickZoomIn;-><init>(Lcom/glympse/android/glympse/MapControl;)V

    iput-object v0, p0, Lcom/glympse/android/glympse/MapControl;->m_oOnClickZoomIn:Lcom/glympse/android/glympse/MapControl$OnClickZoomIn;

    .line 79
    new-instance v0, Lcom/glympse/android/glympse/MapControl$OnClickZoomOut;

    invoke-direct {v0, p0}, Lcom/glympse/android/glympse/MapControl$OnClickZoomOut;-><init>(Lcom/glympse/android/glympse/MapControl;)V

    iput-object v0, p0, Lcom/glympse/android/glympse/MapControl;->m_oOnClickZoomOut:Lcom/glympse/android/glympse/MapControl$OnClickZoomOut;

    .line 80
    new-instance v0, Landroid/view/GestureDetector;

    new-instance v1, Lcom/glympse/android/glympse/MapControl$DoubleTapGestureDetector;

    invoke-direct {v1, p0, v3}, Lcom/glympse/android/glympse/MapControl$DoubleTapGestureDetector;-><init>(Lcom/glympse/android/glympse/MapControl;Lcom/glympse/android/glympse/MapControl$DoubleTapGestureDetector;)V

    invoke-direct {v0, v1}, Landroid/view/GestureDetector;-><init>(Landroid/view/GestureDetector$OnGestureListener;)V

    iput-object v0, p0, Lcom/glympse/android/glympse/MapControl;->m_oGestureDetector:Landroid/view/GestureDetector;

    .line 107
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->getController()Lcom/google/android/maps/MapController;

    move-result-object v0

    iput-object v0, p0, Lcom/glympse/android/glympse/MapControl;->m_oMapController:Lcom/google/android/maps/MapController;

    .line 110
    iget-object v0, p0, Lcom/glympse/android/glympse/MapControl;->m_oMapController:Lcom/google/android/maps/MapController;

    const/16 v1, 0xf

    invoke-virtual {v0, v1}, Lcom/google/android/maps/MapController;->setZoom(I)I

    .line 112
    invoke-virtual {p0, v2}, Lcom/glympse/android/glympse/MapControl;->setFocusable(Z)V

    .line 116
    sget-object v0, Lcom/google/android/maps/MapView$ReticleDrawMode;->DRAW_RETICLE_NEVER:Lcom/google/android/maps/MapView$ReticleDrawMode;

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/MapControl;->setReticleDrawMode(Lcom/google/android/maps/MapView$ReticleDrawMode;)V

    .line 119
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->getOverlays()Ljava/util/List;

    move-result-object v0

    new-instance v1, Lcom/glympse/android/glympse/MapControl$LocationOverlay;

    invoke-direct {v1, p0}, Lcom/glympse/android/glympse/MapControl$LocationOverlay;-><init>(Lcom/glympse/android/glympse/MapControl;)V

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 120
    return-void
.end method


# virtual methods
.method public MapPlease(Landroid/view/ViewGroup;Lcom/glympse/android/glympse/MapControl$EViewMode;)V
    .locals 2
    .parameter "oViewGroup"
    .parameter "eViewMode"

    .prologue
    const/4 v1, -0x1

    .line 125
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v0

    iget v0, v0, Landroid/util/DisplayMetrics;->density:F

    iput v0, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDensity:F

    .line 127
    iput-object p2, p0, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    .line 129
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 131
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->getParent()Landroid/view/ViewParent;

    move-result-object v0

    check-cast v0, Landroid/view/ViewGroup;

    invoke-virtual {v0, p0}, Landroid/view/ViewGroup;->removeView(Landroid/view/View;)V

    .line 134
    :cond_0
    if-eqz p1, :cond_1

    .line 136
    new-instance v0, Landroid/view/ViewGroup$LayoutParams;

    .line 137
    invoke-direct {v0, v1, v1}, Landroid/view/ViewGroup$LayoutParams;-><init>(II)V

    .line 136
    invoke-virtual {p1, p0, v0}, Landroid/view/ViewGroup;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    .line 139
    :cond_1
    return-void
.end method

.method public SetPanning(Z)V
    .locals 2
    .parameter "fPanning"

    .prologue
    const/high16 v0, -0x4080

    .line 220
    iput v0, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownX:F

    .line 221
    iput v0, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownY:F

    .line 223
    iget-boolean v0, p0, Lcom/glympse/android/glympse/MapControl;->m_fPanning:Z

    if-eq v0, p1, :cond_0

    .line 225
    iput-boolean p1, p0, Lcom/glympse/android/glympse/MapControl;->m_fPanning:Z

    .line 227
    iget-boolean v0, p0, Lcom/glympse/android/glympse/MapControl;->m_fPanning:Z

    if-eqz v0, :cond_1

    sget-object v0, Lcom/glympse/android/glympse/MapControl$EViewMode;->DestinationPicker:Lcom/glympse/android/glympse/MapControl$EViewMode;

    iget-object v1, p0, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-eq v0, v1, :cond_1

    .line 229
    sget-object v0, Lcom/google/android/maps/MapView$ReticleDrawMode;->DRAW_RETICLE_UNDER:Lcom/google/android/maps/MapView$ReticleDrawMode;

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/MapControl;->setReticleDrawMode(Lcom/google/android/maps/MapView$ReticleDrawMode;)V

    .line 236
    :goto_0
    sget-object v0, Lcom/glympse/android/glympse/Glympse$EViews;->Map:Lcom/glympse/android/glympse/Glympse$EViews;

    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v1}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v1

    if-ne v0, v1, :cond_0

    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    if-eqz v0, :cond_0

    .line 238
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/ViewMap;->PanningChanged()V

    .line 241
    :cond_0
    return-void

    .line 233
    :cond_1
    sget-object v0, Lcom/google/android/maps/MapView$ReticleDrawMode;->DRAW_RETICLE_NEVER:Lcom/google/android/maps/MapView$ReticleDrawMode;

    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/MapControl;->setReticleDrawMode(Lcom/google/android/maps/MapView$ReticleDrawMode;)V

    goto :goto_0
.end method

.method public SetSatellite(Z)Z
    .locals 4
    .parameter "fSatellite"

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x1

    .line 249
    if-eqz p1, :cond_0

    :try_start_0
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->isSatellite()Z

    move-result v1

    if-nez v1, :cond_0

    .line 251
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/MapControl;->setSatellite(Z)V

    move v1, v2

    .line 267
    :goto_0
    return v1

    .line 255
    :cond_0
    if-nez p1, :cond_1

    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->isSatellite()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 257
    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/MapControl;->setSatellite(Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move v1, v2

    .line 258
    goto :goto_0

    .line 261
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 263
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    move v1, v2

    .line 264
    goto :goto_0

    .end local v0           #e:Ljava/lang/Exception;
    :cond_1
    move v1, v3

    .line 267
    goto :goto_0
.end method

.method public SetTraffic(Z)Z
    .locals 4
    .parameter "fTraffic"

    .prologue
    const/4 v3, 0x0

    const/4 v2, 0x1

    .line 282
    if-eqz p1, :cond_0

    :try_start_0
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->isTraffic()Z

    move-result v1

    if-nez v1, :cond_0

    .line 284
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/MapControl;->setTraffic(Z)V

    move v1, v2

    .line 300
    :goto_0
    return v1

    .line 288
    :cond_0
    if-nez p1, :cond_1

    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->isTraffic()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 290
    const/4 v1, 0x0

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/MapControl;->setTraffic(Z)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move v1, v2

    .line 291
    goto :goto_0

    .line 294
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 296
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    move v1, v2

    .line 297
    goto :goto_0

    .end local v0           #e:Ljava/lang/Exception;
    :cond_1
    move v1, v3

    .line 300
    goto :goto_0
.end method

.method public ToggleSatellite()V
    .locals 1

    .prologue
    .line 273
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->isSatellite()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/MapControl;->SetSatellite(Z)Z

    .line 274
    return-void

    .line 273
    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method public ToggleTraffic()V
    .locals 1

    .prologue
    .line 306
    invoke-virtual {p0}, Lcom/glympse/android/glympse/MapControl;->isTraffic()Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    :goto_0
    invoke-virtual {p0, v0}, Lcom/glympse/android/glympse/MapControl;->SetTraffic(Z)Z

    .line 307
    return-void

    .line 306
    :cond_0
    const/4 v0, 0x1

    goto :goto_0
.end method

.method protected ZoomIn()V
    .locals 3

    .prologue
    .line 315
    :try_start_0
    iget-object v1, p0, Lcom/glympse/android/glympse/MapControl;->m_oMapController:Lcom/google/android/maps/MapController;

    invoke-virtual {v1}, Lcom/google/android/maps/MapController;->zoomIn()Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 322
    :goto_0
    sget-object v1, Lcom/glympse/android/glympse/Glympse$EViews;->Map:Lcom/glympse/android/glympse/Glympse$EViews;

    sget-object v2, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v2}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v2

    if-ne v1, v2, :cond_0

    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v1, v1, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    if-eqz v1, :cond_0

    .line 324
    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v1, v1, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    invoke-virtual {v1}, Lcom/glympse/android/glympse/ViewMap;->ZoomChanged()V

    .line 326
    :cond_0
    return-void

    .line 317
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 319
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method protected ZoomOut()V
    .locals 3

    .prologue
    .line 335
    :try_start_0
    iget-object v1, p0, Lcom/glympse/android/glympse/MapControl;->m_oMapController:Lcom/google/android/maps/MapController;

    invoke-virtual {v1}, Lcom/google/android/maps/MapController;->zoomOut()Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 342
    :goto_0
    sget-object v1, Lcom/glympse/android/glympse/Glympse$EViews;->Map:Lcom/glympse/android/glympse/Glympse$EViews;

    sget-object v2, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v2}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v2

    if-ne v1, v2, :cond_0

    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v1, v1, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    if-eqz v1, :cond_0

    .line 344
    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v1, v1, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    invoke-virtual {v1}, Lcom/glympse/android/glympse/ViewMap;->ZoomChanged()V

    .line 346
    :cond_0
    return-void

    .line 337
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 339
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method public draw(Landroid/graphics/Canvas;)V
    .locals 1
    .parameter "canvas"

    .prologue
    .line 208
    :try_start_0
    invoke-super {p0, p1}, Lcom/google/android/maps/MapView;->draw(Landroid/graphics/Canvas;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 214
    :goto_0
    return-void

    .line 210
    :catch_0
    move-exception v0

    .line 212
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_0
.end method

.method public onKeyDown(ILandroid/view/KeyEvent;)Z
    .locals 2
    .parameter "keyCode"
    .parameter "event"

    .prologue
    .line 87
    iget-object v0, p0, Lcom/glympse/android/glympse/MapControl;->m_eViewMode:Lcom/glympse/android/glympse/MapControl$EViewMode;

    sget-object v1, Lcom/glympse/android/glympse/MapControl$EViewMode;->MainMap:Lcom/glympse/android/glympse/MapControl$EViewMode;

    if-ne v0, v1, :cond_0

    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v0}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v0

    sget-object v1, Lcom/glympse/android/glympse/Glympse$EViews;->Map:Lcom/glympse/android/glympse/Glympse$EViews;

    if-ne v0, v1, :cond_0

    .line 89
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oViewMap:Lcom/glympse/android/glympse/ViewMap;

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewMap;->m_oGlympseView:Lcom/glympse/android/glympse/ViewMap$MyGlympseView;

    invoke-virtual {v0, p1, p2}, Lcom/glympse/android/glympse/ViewMap$MyGlympseView;->OnKeyDownForward(ILandroid/view/KeyEvent;)Z

    move-result v0

    if-eqz v0, :cond_0

    .line 91
    const/4 v0, 0x1

    .line 95
    :goto_0
    return v0

    :cond_0
    invoke-super {p0, p1, p2}, Lcom/google/android/maps/MapView;->onKeyDown(ILandroid/view/KeyEvent;)Z

    move-result v0

    goto :goto_0
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 5
    .parameter "ev"

    .prologue
    const/4 v4, 0x0

    const/4 v3, 0x1

    .line 147
    :try_start_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    if-nez v1, :cond_2

    .line 149
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    iput v1, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownX:F

    .line 150
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v1

    iput v1, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownY:F

    .line 162
    :cond_0
    :goto_0
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    if-ne v1, v3, :cond_1

    .line 164
    const/high16 v1, -0x4080

    iput v1, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownX:F

    .line 165
    const/high16 v1, -0x4080

    iput v1, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownY:F

    .line 169
    :cond_1
    iget-object v1, p0, Lcom/glympse/android/glympse/MapControl;->m_oGestureDetector:Landroid/view/GestureDetector;

    invoke-virtual {v1, p1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 179
    :goto_1
    :try_start_1
    invoke-super {p0, p1}, Lcom/google/android/maps/MapView;->onTouchEvent(Landroid/view/MotionEvent;)Z
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    move-result v1

    .line 186
    :goto_2
    return v1

    .line 154
    :cond_2
    :try_start_2
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v1

    const/4 v2, 0x2

    if-ne v1, v2, :cond_0

    .line 155
    iget v1, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownX:F

    cmpl-float v1, v1, v4

    if-ltz v1, :cond_3

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v1

    iget v2, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownX:F

    sub-float/2addr v1, v2

    invoke-static {v1}, Ljava/lang/Math;->abs(F)F

    move-result v1

    sget v2, Lcom/glympse/android/glympse/MapControl;->m_fltPanThreshhold:F

    cmpl-float v1, v1, v2

    if-gez v1, :cond_4

    .line 156
    :cond_3
    iget v1, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownY:F

    cmpl-float v1, v1, v4

    if-ltz v1, :cond_0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v1

    iget v2, p0, Lcom/glympse/android/glympse/MapControl;->m_fltDownY:F

    sub-float/2addr v1, v2

    invoke-static {v1}, Ljava/lang/Math;->abs(F)F

    move-result v1

    sget v2, Lcom/glympse/android/glympse/MapControl;->m_fltPanThreshhold:F

    cmpl-float v1, v1, v2

    if-ltz v1, :cond_0

    .line 158
    :cond_4
    const/4 v1, 0x1

    invoke-virtual {p0, v1}, Lcom/glympse/android/glympse/MapControl;->SetPanning(Z)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_0

    .line 171
    :catch_0
    move-exception v1

    move-object v0, v1

    .line 173
    .local v0, e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_1

    .line 181
    .end local v0           #e:Ljava/lang/Exception;
    :catch_1
    move-exception v0

    .line 183
    .restart local v0       #e:Ljava/lang/Exception;
    invoke-static {v0}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    move v1, v3

    .line 186
    goto :goto_2
.end method
